﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:mapsui="clr-namespace:Mapsui.Windows;assembly=Mapsui.Windows" 
	xmlns:controls="clr-namespace:EarthWatchers.SL.GUI.Controls" 
	xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
	x:Class="EarthWatchers.SL.MainPage"
    d:DesignHeight="600" d:DesignWidth="800" mc:Ignorable="d">
    <UserControl.Resources>
        <Storyboard x:Name="OpenRightMenu">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="menuRight">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-299.5">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="CloseRightMenu">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="menuRight">
                <SplineDoubleKeyFrame KeyTime="0" Value="-299.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="mainGrid" Background="Black">
        <Grid>
            <Grid x:Name="mapGrid" RenderTransformOrigin="0.5,0.5" Background="#FFEFEFEF">
                <Grid.RenderTransform>
                    <CompositeTransform/>
                </Grid.RenderTransform>

                <Grid x:Name="mapWrapper">
                    <mapsui:MapControl x:Name="mapControl" MouseLeftButtonDown="MapControlMouseLeftButtonDown" MouseLeftButtonUp="MapControlMouseLeftButtonUp" MouseMove="MapControlMouseMove" MouseLeave="MapControlMouseLeave"/>
                    <CheckBox Name="checkBox_search" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="160,120" Checked="on_CheckBox_Checked" Unchecked="on_CheckBox_UnChecked" Visibility="Collapsed" />
                    <TextBox Name="txt_search" Height="30" Width="120" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="200,120" TextChanged="onText_Changed" Visibility="Collapsed"/>
                    <ComboBox Name="combo_search" Height="20" Width="120" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="200,150" MaxDropDownHeight="150" SelectionChanged="on_Selection_changed" Visibility="Collapsed"/>
                    <controls:DistanceCalculationControl x:Name="distanceCalculator" Visibility="Collapsed" />
                    <Grid x:Name="legendGrid" HorizontalAlignment="Left" Margin="136,0,0,-1" VerticalAlignment="Bottom">
                        <Rectangle Fill="#B29B9B9B" Margin="0" Stroke="White"/>
                        <Image x:Name="legendImage" Margin="0" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/>
                    </Grid>
                    <Grid x:Name="landInfoWrapper" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                    <Grid Margin="0" Width="196" HorizontalAlignment="Left">
                        <Border BorderBrush="#FF9eba10" BorderThickness="1">
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                    <GradientStop Color="#FF859b14" Offset="0" />
                                    <GradientStop Color="#FF9eba10" Offset="0.5" />
                                    <GradientStop Color="#FF859b14" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <toolkit:DockPanel Margin="0">
                                <controls:UserInfo x:Name="userInfo" VerticalAlignment="Top" HorizontalAlignment="Left" toolkit:DockPanel.Dock="Top" />
                                <controls:LayerList x:Name="layerList" Margin="0,-2,0,0" d:LayoutOverrides="Height" toolkit:DockPanel.Dock="Bottom" />
                            </toolkit:DockPanel>
                        </Border>
                        <Grid x:Name="menuGrid" HorizontalAlignment="Right" Margin="0,0,-23,0" Width="23" VerticalAlignment="Top" Height="138" d:LayoutOverrides="VerticalAlignment">
                            <Border BorderBrush="Black" BorderThickness="0,1,1,1" Margin="0,-1,-1,-1" Background="#D8FFFFFF"/>
                            <Image Source="Resources/Images/backgroundshadow.png" Stretch="Fill" Margin="0" VerticalAlignment="Top" HorizontalAlignment="Left" />
                            <StackPanel Margin="0,3,0,0" VerticalAlignment="Top">
                                <Button x:Name="btnZoomIn" Click="BtnZoomInClick" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="zoom in" HorizontalAlignment="Right" VerticalAlignment="Top" Width="22" Height="22">
                                    <Image Height="20" Source="Resources/Images/zoomin.png" Stretch="Fill" Width="20"/>
                                </Button>
                                <Button x:Name="btnZoomOut" Click="BtnZoomOutClick" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="zoom out" HorizontalAlignment="Right" VerticalAlignment="Top" Width="22" Height="22">
                                    <Image Height="20" Source="Resources/Images/zoomout.png" Stretch="Fill" Width="20"/>
                                </Button>
                                <Button x:Name="btnFs" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="Fullscreen" HorizontalAlignment="Right" VerticalAlignment="Top">
                                    <Image x:Name="btnFullscreen" MouseLeftButtonDown="BtnFullscreenMouseLeftButtonDown" HorizontalAlignment="Left" Source="Resources/Images/fullscreen.png" Stretch="Fill" Width="20" Margin="1"/>
                                </Button>
                                <Button x:Name="btnHelp1" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="Help" HorizontalAlignment="Right" VerticalAlignment="Top" >
                                    <Image x:Name="btnHelp" MouseLeftButtonDown="BtnHelpMouseLeftButtonDown" HorizontalAlignment="Left" Source="Resources/Images/questionmark.png" Stretch="Fill" Width="20" Margin="1" Height="20"/>
                                </Button>
                                <Button x:Name="btnPublish" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="Publish Map" HorizontalAlignment="Right" VerticalAlignment="Top">
                                    <Image x:Name="btnPublish1" MouseLeftButtonDown="PublishClick"  HorizontalAlignment="Left" Source="Resources/Images/publishmap.png" Stretch="Fill" Width="20" Margin="1" Height="20"/>
                                </Button>
                                <Button x:Name="btnDistance" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="Calculate distance" HorizontalAlignment="Right" VerticalAlignment="Top">
                                    <Image x:Name="btnDistance2" MouseLeftButtonDown="DistanceClick"  HorizontalAlignment="Left" Source="Resources/Images/ruler.png" Stretch="Fill" Width="20" Margin="1" Height="20"/>
                                </Button>
                                <Button x:Name="btnSearch" Margin="0" Style="{StaticResource ImageButton}" ToolTipService.ToolTip="Search place" HorizontalAlignment="Right" VerticalAlignment="Top" Visibility="Collapsed">
                                    <Image x:Name="btnDistance3" MouseLeftButtonDown="SearchClick"  HorizontalAlignment="Left" Source="Resources/Images/search.png" Stretch="Fill" Width="20" Margin="1" Height="20"/>
                                </Button>
                                <Canvas x:Name="dragCanvas" Background="Transparent" HorizontalAlignment="Left" Visibility="Collapsed">
                                    <controls:Flag Width="22" Height="22" ToolTipService.ToolTip="Drag to flag a location" Cursor="Hand" />
                                </Canvas>
                            </StackPanel>
                        </Grid>
                    </Grid>
                    <toolkit:DockPanel x:Name="menuRight" Margin="0,-2,-300,-2" HorizontalAlignment="Right" Width="300" RenderTransformOrigin="0.5,0.5">
                        <toolkit:DockPanel.RenderTransform>
                            <CompositeTransform/>
                        </toolkit:DockPanel.RenderTransform>
                        <Grid>
                            <controls:TiledBackground SourceUri="/EarthWatchers.SL;component/Resources/Images/backgroundtexture.png" Opacity="0.85" Margin="0" d:LayoutOverrides="Width" />
                            <Image Source="Resources/Images/backgroundshadow.png" Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top" d:LayoutOverrides="HorizontalAlignment" />
                            <Border Margin="0" Padding="0" BorderBrush="#FFE7E7E7" BorderThickness="1,0,0,0" RenderTransformOrigin="0,0" />
                            <sdk:TabControl Margin="2,0,0,0" BorderBrush="Black" Background="{x:Null}" BorderThickness="0,0,116,0">
                                <sdk:TabItem x:Name="news" Header="News" FontSize="9.333" Background="{x:Null}">
                                    <Grid>
                                        <controls:NewsOverview x:Name="newsOverview" />
                                    </Grid>
                                </sdk:TabItem>
                                <sdk:TabItem Header="Alerted Land" FontSize="9.333" Background="{x:Null}">
                                    <Grid>
                                        <controls:AlertedLandOverview x:Name="alertedlandOverview" />
                                    </Grid>
                                </sdk:TabItem>
                            </sdk:TabControl>
                            <Path x:Name="btnLeftMenu" Cursor="Hand" MouseEnter="BtnLeftMenuMouseEnter" MouseLeave="BtnLeftMenuMouseLeave" MouseLeftButtonDown="BtnLeftMenuMouseLeftButtonDown" Data="M0.00035667527,213.74979 L-17.499695,242.12518 L-17.499426,310.62616 L-0.33282933,329.0014" Fill="#FFDEDEE0" HorizontalAlignment="Left" Margin="-18,0,0,0" Stretch="Fill" Stroke="DarkGray" UseLayoutRounding="False" Width="18.5" Height="116.25" VerticalAlignment="Center" />
                            <TextBlock x:Name="txtInfo" FontWeight="Bold" Cursor="Hand" Text="info" MouseEnter="BtnLeftMenuMouseEnter" MouseLeave="BtnLeftMenuMouseLeave" MouseLeftButtonDown="BtnLeftMenuMouseLeftButtonDown" Foreground="Black" HorizontalAlignment="Left" Margin="-16,36,0,0" VerticalAlignment="Center" >
                                <TextBlock.RenderTransform>
                                    <RotateTransform Angle="-90" />
                                </TextBlock.RenderTransform>
                            </TextBlock>
                        </Grid>
                    </toolkit:DockPanel>
                </Grid>
            </Grid>
            <Grid x:Name="woodGrid" Margin="0,-59.321,115.578,0" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" HorizontalAlignment="Right" Width="67.142" Height="269.363" VerticalAlignment="Top" Visibility="Collapsed">
                <Grid.RenderTransform>
                    <CompositeTransform Rotation="104.274"/>
                </Grid.RenderTransform>
                <Image Margin="0" Source="Resources/Images/tree_texture.jpg" Stretch="Fill"/>
                <Grid Height="18.19" Margin="0.533,0,15.467,25.923" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5">
                    <Grid.RenderTransform>
                        <CompositeTransform Rotation="-92.107"/>
                    </Grid.RenderTransform>
                    <TextBlock TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" Margin="0,-13.301,-181.735,-32.012" FontWeight="Bold" FontFamily="Segoe WP" FontSize="24" HorizontalAlignment="Right" Width="193.77" d:LayoutOverrides="HorizontalAlignment">
                        <TextBlock.RenderTransform>
                            <CompositeTransform Rotation="1.856"/>
                        </TextBlock.RenderTransform><Run Text="DeforestAction"/><LineBreak/><Run Text=" EarthWatchers"/></TextBlock>
                </Grid>
            </Grid>
            <Grid Margin="0,88,0,0" VerticalAlignment="Top" HorizontalAlignment="Center" Width="305" Background="#FFEBEBEB" Height="14" Visibility="Collapsed">
                <Border BorderBrush="Black" BorderThickness="1,0,1,1" Margin="0" Padding="0"/>
                <StackPanel Orientation="Horizontal" Margin="5,-2,-12,0" VerticalAlignment="Center">
                    <Rectangle Fill="#FFF4F4F5" Margin="0" Stroke="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="22" Height="12"/>
                    <sdk:Label HorizontalAlignment="Center" Margin="2,-2,0,0" Content="Unchecked" VerticalAlignment="Center" FontSize="10.667" FontWeight="Normal"/>
                    <Rectangle Fill="#FF4FA317" Margin="12,0,0,0" Stroke="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="22" Height="12"/>
                    <sdk:Label HorizontalAlignment="Center" Margin="2,-2,0,0" VerticalAlignment="Center" Content="Ok" FontSize="10.667" FontWeight="Normal"/>
                    <Grid Height="12" Width="22" Margin="12,0,0,0">
                        <Rectangle Fill="#FFA9361C" Stroke="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="22" Height="12"/>
                        <Image Source="Resources/Images/warning.png" Stretch="Fill" Width="10" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" Height="10"/>
                    </Grid>
                    <sdk:Label HorizontalAlignment="Center" Margin="2,-2,0,0" Content="Alert" VerticalAlignment="Center" FontSize="10.667" FontWeight="Normal"/>
                    <Rectangle Fill="#FFCC7318" Stroke="Black" Width="29" Height="4" Margin="9,0,0,0"/>
                    <sdk:Label HorizontalAlignment="Center" Margin="2,-2,0,0" Content="My Land" VerticalAlignment="Center" FontSize="10.667" FontWeight="Normal"/>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
